import { ResPage, Model } from "@/api/interface/index";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

/**
 * @name 模型管理模块
 */
// 获取模型列表
// export const getModelList = (params: Model.ReqModelParams) => {
//   return http.post<ResPage<Model.ResModelList>>(PORT1 + `/Model/list`, params);
// };
//
// // 获取树形模型列表
// export const getModelTreeList = (params: Model.ReqModelParams) => {
//   return http.post<ResPage<Model.ResModelList>>(PORT1 + `/Model/tree/list`, params);
// };

// 新增模型
export const addModel = (params: { id: string; name: string }) => {
  return http.post(PORT1 + `/Model/add`, params);
};

// 批量添加模型
export const BatchAddModel = (params: FormData) => {
  return http.post(PORT1 + `/Model/import`, params);
};

// 编辑模型
export const editModel = (params: { id: string }) => {
  return http.post(PORT1 + `/Model/edit`, params);
};

// 删除模型
export const deleteModel = (params: { id: string[] }) => {
  return http.post(PORT1 + `/Model/delete`, params);
};

// 切换模型状态
export const changeModelStatus = (params: { id: string; status: number }) => {
  return http.post(PORT1 + `/Model/change`, params);
};

// 重置模型密码
export const resetModelPassWord = (params: { id: string }) => {
  return http.post(PORT1 + `/Model/rest_password`, params);
};

// 导出模型数据
// export const exportModelInfo = (params: Model.ReqModelParams) => {
//   return http.download(PORT1 + `/Model/export`, params);
// };
//
// // 获取模型状态字典
// export const getModelStatus = () => {
//   return http.get<Model.ResStatus[]>(PORT1 + `/Model/status`);
// };
//
// // 获取模型性别字典
// export const getModelGender = () => {
//   return http.get<Model.ResGender[]>(PORT1 + `/Model/gender`);
// };
//
// // 获取模型部门列表
// export const getModelDepartment = () => {
//   return http.get<Model.ResDepartment[]>(PORT1 + `/Model/department`);
// };
//
// // 获取模型角色字典
// export const getModelRole = () => {
//   return http.get<Model.ResRole[]>(PORT1 + `/Model/role`);
// };
